﻿namespace WMS6.Web.Common
{
    using FastReport;
    using FastReport.Web;
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.IO;
    using System.Web;
    using System.Web.UI.HtmlControls;
    using WMS6.Web;
    using WMS6.Web.AnalyticsReportServiceRef;
    using WMS6.Web.BaseInfoDetailServiceRef;
    using WMS6.Web.BaseInfoServiceRef;
    using WMS6.Web.CommonMethodServiceRef;

    public class PrintReport : BasePage
    {
        protected HtmlForm form1;
        protected WebReport WMS6PrintReport;

        private void CommoditySignoff()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintCommoditySignoff(base.Request.QueryString["orderID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "CommoditySignoff";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "CommoditySignoffDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintCommoditySignoff.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintCommoditySignoff.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        public void DiffCountRpt()
        {
            DiffCountRptQueryEntity diffCountRptQueryEntity = new DiffCountRptQueryEntity();
            if (this.Session["PrintReportParas"] != null)
            {
                diffCountRptQueryEntity = this.Session["PrintReportParas"] as DiffCountRptQueryEntity;
            }
            diffCountRptQueryEntity.IsGetAll = true;
            diffCountRptQueryEntity.SortField = "LOC";
            diffCountRptQueryEntity.SortDirection = "DESC";
            if (base.Request.QueryString["ShowLot"] == "true")
            {
                diffCountRptQueryEntity.ShowLot = "Y";
            }
            else
            {
                diffCountRptQueryEntity.ShowLot = "N";
            }
            if (base.Request.QueryString["ShowOtherSku"] == "true")
            {
                diffCountRptQueryEntity.ShowOtherSku = "Y";
            }
            else
            {
                diffCountRptQueryEntity.ShowOtherSku = "N";
            }
            List<DiffCountRptInfo> diffCountRptInfo = new List<DiffCountRptInfo>();
            diffCountRptInfo = AnalyticsReportServiceClientProxy.GetInstance().GetDiffCountReportList(diffCountRptQueryEntity);
            Report FReport = new Report();
            string path = base.Server.MapPath("").Replace(@"\Common", "");
            string reportPath = string.Empty;
            if (base.Request.QueryString["ShowLot"] == "true")
            {
                reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_DiffCountRptShowLot.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\DiffCountRptShowLot.frx";
                }
            }
            else
            {
                reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_DiffCountRpt.frx";
                if (!File.Exists(base.Server.MapPath(reportPath)))
                {
                    reportPath = path + @"\Reports\DiffCountRpt.frx";
                }
            }
            string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
            FReport.Report.Load(reportPath);
            PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
            if (picObject != null)
            {
                picObject.ImageLocation = logoPath;
            }
            TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
            if (textObject != null)
            {
                textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
            }
            ((TextObject) FReport.FindObject("txtWhName")).Text = base.UserInfo.WhDbDesc;
            FReport.RegisterData(diffCountRptInfo, "DiffCountRptInfo");
            this.WMS6PrintReport.Report = FReport;
        }

        private void EncasingDetailNote()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetEncasingDetailNote(base.Request.QueryString["orderID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "EncasingNote";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "EncasingNoteDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_EncasingDetailNote.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\EncasingDetailNote.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void EncasingNote()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetEncasingNote(base.Request.QueryString["orderID"], base.Request.QueryString["OwnerID"]);
                ds.Tables[0].TableName = "EncasingNote";
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_EncasingNote.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\EncasingNote.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.Page.Response.Buffer = false;
            this.Page.Response.Cache.SetNoStore();
        }

        public void PhysicalCountRpt()
        {
            PhysicalCountRptQueryEntity physicalCountRptQueryEntity = new PhysicalCountRptQueryEntity();
            if (this.Session["PrintReportParas"] != null)
            {
                physicalCountRptQueryEntity = this.Session["PrintReportParas"] as PhysicalCountRptQueryEntity;
            }
            physicalCountRptQueryEntity.IsGetAll = true;
            physicalCountRptQueryEntity.SortField = "L.LOC,A.SKU_ID";
            physicalCountRptQueryEntity.SortDirection = "ASC";
            if (base.Request.QueryString["ShowLoc"] == "false")
            {
                physicalCountRptQueryEntity.ShowLoc = "N";
            }
            else
            {
                physicalCountRptQueryEntity.ShowLoc = "Y";
            }
            if (base.Request.QueryString["ShowLot"] == "false")
            {
                physicalCountRptQueryEntity.ShowLot = "N";
            }
            else
            {
                physicalCountRptQueryEntity.ShowLot = "Y";
            }
            List<PhysicalCountRptInfo> physicalCountRptInfo = new List<PhysicalCountRptInfo>();
            physicalCountRptInfo = AnalyticsReportServiceClientProxy.GetInstance().GetPhysicalCountReportList(physicalCountRptQueryEntity);
            Report FReport = new Report();
            string path = base.Server.MapPath("").Replace(@"\Common", "");
            string reportPath = string.Empty;
            if (physicalCountRptQueryEntity.ShowLot == "Y")
            {
                reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PhysicalCountRptShowLot.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PhysicalCountRptShowLot.frx";
                }
            }
            else
            {
                reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PhysicalCountRpt.frx";
                if (!File.Exists(base.Server.MapPath(reportPath)))
                {
                    reportPath = path + @"\Reports\PhysicalCountRpt.frx";
                }
            }
            string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
            FReport.Report.Load(reportPath);
            PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
            if (picObject != null)
            {
                picObject.ImageLocation = logoPath;
            }
            TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
            if (textObject != null)
            {
                textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
            }
            ((TextObject) FReport.FindObject("txtWhName")).Text = base.UserInfo.WhDbDesc;
            FReport.RegisterData(physicalCountRptInfo, "PhysicalCountRptInfo");
            this.WMS6PrintReport.Report = FReport;
        }

        private void PrinBatchOutboundList()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintBatchOutboundListReport(base.Request.QueryString["orderID"], base.Request.QueryString["detailID"], base.Request.QueryString["OwnerID"]);
                ds.Tables[0].TableName = "OutboundListDetail";
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintBatchOutboundList.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintBatchOutboundList.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
                }
                TextObject txtOrderIDs = FReport.FindObject("txtOrderIDs") as TextObject;
                if (txtOrderIDs != null)
                {
                    txtOrderIDs.Text = base.Request.QueryString["detailID"].Replace("'", "");
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintAllocation()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["receiptID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintAllocation(base.Request.QueryString["receiptID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "Receipt";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "ReceiptDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintAllocation.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintAllocation.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintBatchPickAdviceReport()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["waveID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintBatchPickAdviceReportByOrders(base.Request.QueryString["detailID"], base.Request.QueryString["OwnerID"]);
                ds.Tables[0].TableName = "PickListDetail";
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintBatchPickAdviceReport.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintBatchPickAdviceReport.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                    if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                    {
                        logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                        if (!File.Exists(logoPath))
                        {
                            logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                        }
                    }
                    PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                    if (picObject != null)
                    {
                        picObject.ImageLocation = logoPath;
                    }
                    TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                    if (textObject != null)
                    {
                        textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                    }
                }
                TextObject txtOrderIDs = FReport.FindObject("txtOrderIDs") as TextObject;
                if (txtOrderIDs != null)
                {
                    txtOrderIDs.Text = base.Request.QueryString["detailID"];
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintBatchPickListReport()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintBatchPickListReportInfo(base.Request.QueryString["orderID"], base.Request.QueryString["OwnerID"]);
                ds.Tables[0].TableName = "PickListDetail";
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintPickListReport.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintPickListReport.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintBatchShippingOrderReport()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintBatchShippingOrderReport(base.Request.QueryString["orderID"], base.Request.QueryString["detailID"], base.Request.QueryString["OwnerID"]);
                ds.Tables[0].TableName = "ShippingOrderDetail";
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintBatchShippingOrder.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintBatchShippingOrder.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
                }
                TextObject txtOrderIDs = FReport.FindObject("txtOrderIDs") as TextObject;
                if (txtOrderIDs != null)
                {
                    txtOrderIDs.Text = base.Request.QueryString["detailID"].Replace("'", "");
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintCycleCountReport()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["ReleaseID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().PrintCycleCountByReleaseID(base.Request.QueryString["ReleaseID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "CycleCount";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "CycleCountDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = string.Empty;
                if (ds.Tables[0].Rows[0]["SHOW_QTY"].ToString() == "Y")
                {
                    reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintCycleCountShowSystemQty.frx";
                    if (!File.Exists(reportPath))
                    {
                        reportPath = path + @"\Reports\PrintCycleCountShowSystemQty.frx";
                    }
                }
                else
                {
                    reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintCycleCount.frx";
                    if (!File.Exists(base.Server.MapPath(reportPath)))
                    {
                        reportPath = path + @"\Reports\PrintCycleCount.frx";
                    }
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        public void PrintLpnLabel()
        {
            DataSet ds;
            Report FReport;
            string path;
            string reportPath;
            string logoPath;
            if (this.Session["PrintLpnIDS"] != null)
            {
                string lpnIDs = this.Session["PrintLpnIDS"] as string;
                ds = PrintReportServiceClientProxy.GetInstance().GetPrintLpnLabelInfo(lpnIDs, base.Request.QueryString["OwnerID"]);
                ds.Tables[0].TableName = "LpnLabel";
                FReport = new Report();
                path = base.Server.MapPath("").Replace(@"\Common", "");
                reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintLpnLabel.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintLpnLabel.frx";
                }
                logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
            else if (this.Session["lpnSplitTable"] != null)
            {
                DataTable dt = this.Session["lpnSplitTable"] as DataTable;
                ds = new DataSet();
                dt.TableName = "LpnLabel";
                ds.Tables.Add(dt);
                FReport = new Report();
                path = base.Server.MapPath("").Replace(@"\Common", "");
                reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintLpnLabel.frx";
                if (!File.Exists(base.Server.MapPath(reportPath)))
                {
                    reportPath = path + @"\Reports\PrintLpnLabel.frx";
                }
                logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintMergePickListReportInfo()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintMergePickListReportInfo(base.Request.QueryString["orderID"], base.Request.QueryString["descr"], base.Request.QueryString["detailID"], base.Request.QueryString["OwnerID"]);
                ds.Tables[0].TableName = "PickListDetail";
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintMergePickListReportInfo.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintMergePickListReportInfo.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
                }
                ((TextObject) FReport.FindObject("txtWaveID")).Text = base.Request.QueryString["orderID"];
                ((TextObject) FReport.FindObject("txtWaveDescr")).Text = base.Request.QueryString["descr"];
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintOrderMovement()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["movementID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintOrderMovementInfo(base.Request.QueryString["movementID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "OrderMovement";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "OrderMovementDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintOrderMovement.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintOrderMovement.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintOutbound()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintOutboundInfo(base.Request.QueryString["orderID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "Outbound";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "OutboundDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintOutbound.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintOutbound.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintOutboundList()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintOutboundListInfo(base.Request.QueryString["orderID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "OutboundList";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "OutboundListDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintOutboundList.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintOutboundList.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintPCMaintenanceList()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["PhysicalRequestID"]) && !string.IsNullOrEmpty(base.Request.QueryString["OnlyNonEmptyLoc"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().PrintPCMaintenanceList(base.Request.QueryString["PhysicalRequestID"], base.Request.QueryString["OnlyNonEmptyLoc"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "PCMaintenance";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "PCMaintenanceDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintPCMaintenance.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintPCMaintenance.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintPCMaintenanceListShowSystemQty()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["PhysicalRequestID"]) && !string.IsNullOrEmpty(base.Request.QueryString["OnlyNonEmptyLoc"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().PrintPCMaintenanceList(base.Request.QueryString["PhysicalRequestID"], base.Request.QueryString["OnlyNonEmptyLoc"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "PCMaintenance";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "PCMaintenanceDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintPCMaintenancetShowSystemQty.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintPCMaintenancetShowSystemQty.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintPcReview()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["PhysicalRequestID"]) && !string.IsNullOrEmpty(base.Request.QueryString["OnlyNonEmptyLoc"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().PrintPCReview(base.Request.QueryString["PhysicalRequestID"], base.Request.QueryString["OnlyNonEmptyLoc"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "PCReview";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "PCReviewDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintPCReview.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintPCReview.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintPcReviewShowSystemQty()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["PhysicalRequestID"]) && !string.IsNullOrEmpty(base.Request.QueryString["OnlyNonEmptyLoc"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().PrintPCReview(base.Request.QueryString["PhysicalRequestID"], base.Request.QueryString["OnlyNonEmptyLoc"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "PCReview";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "PCReviewDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintPCReviewShowSystemQty.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintPCReviewShowSystemQty.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintPickDivideReport()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintPickDivideReport(base.Request.QueryString["orderID"], base.Request.QueryString["detailID"], base.Request.QueryString["OwnerID"]);
                ds.Tables[0].TableName = "PickListDetail";
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintPickDivideReportInfo.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintPickDivideReportInfo.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
                }
                ((TextObject) FReport.FindObject("txtWaveID")).Text = base.Request.QueryString["orderID"];
                ((TextObject) FReport.FindObject("txtWaveDescr")).Text = base.Request.QueryString["descr"];
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintPickListReport()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintPickListReportInfo(base.Request.QueryString["orderID"], base.Request.QueryString["OwnerID"]);
                ds.Tables[0].TableName = "PickListDetail";
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintPickListReport.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintPickListReport.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                    if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                    {
                        logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                        if (!File.Exists(logoPath))
                        {
                            logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                        }
                    }
                    PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                    if (picObject != null)
                    {
                        picObject.ImageLocation = logoPath;
                    }
                    TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                    if (textObject != null)
                    {
                        textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                    }
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintPickReport()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintPickReportInfo(base.Request.QueryString["orderID"], base.Request.QueryString["OwnerID"]);
                ds.Tables[0].TableName = "PickListDetail";
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintPickReport.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintPickReport.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                    if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                    {
                        logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                        if (!File.Exists(logoPath))
                        {
                            logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                        }
                    }
                    PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                    if (picObject != null)
                    {
                        picObject.ImageLocation = logoPath;
                    }
                    TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                    if (textObject != null)
                    {
                        textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                    }
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintPickWorkReport()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintPickWorkReportInfo(base.Request.QueryString["orderID"], base.Request.QueryString["OwnerID"]);
                ds.Tables[0].TableName = "PickListDetail";
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintPickWorkReport.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintPickWorkReport.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                    if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                    {
                        logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                        if (!File.Exists(logoPath))
                        {
                            logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                        }
                    }
                    PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                    if (picObject != null)
                    {
                        picObject.ImageLocation = logoPath;
                    }
                    TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                    if (textObject != null)
                    {
                        textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                    }
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintPurchaseOrder()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["PoID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintPurchaseOrderInfo(base.Request.QueryString["PoID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "PurchaseOrder";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "PurchaseOrderDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintPurchaseOrder.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintPurchaseOrder.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintPutAwayReport()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["receiptID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintPutawayReportInfo(base.Request.QueryString["receiptID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "PutAway";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "PutAwayDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintPutawayReport.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintPutawayReport.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintReceipt()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["receiptID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintReceiptInfo(base.Request.QueryString["receiptID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "Receipt";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "ReceiptDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintReceipt.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintReceipt.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintReceiptHistory()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["receiptID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintReceiptHistoryInfo(base.Request.QueryString["receiptID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "ReceiptHistory";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "ReceiptHistoryDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintReceiptHistory.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintReceiptHistory.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintReceiptList()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["receiptID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintReceiptInfo(base.Request.QueryString["receiptID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "Receipt";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "ReceiptDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintReceiptList.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintReceiptList.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintSalesOrder()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["orderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintSalesOrderInfo(base.Request.QueryString["orderID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "SalesOrder";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "SalesOrderDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintSalesOrder.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintSalesOrder.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintShippingOrderReport()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["OrderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintShippingOrderByID(base.Request.QueryString["OrderID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "ShippingOrder";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "ShippingOrderDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintShippingOrder.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintShippingOrder.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintShippingOrderReportOCV()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["OrderID"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintShippingOrderByID(base.Request.QueryString["OrderID"], base.Request.QueryString["OwnerID"]);
                for (int i = 0; i < ds.Tables.Count; i++)
                {
                    switch (i)
                    {
                        case 0:
                            ds.Tables[i].TableName = "ShippingOrder";
                            break;

                        case 1:
                            ds.Tables[i].TableName = "ShippingOrderDetail";
                            break;
                    }
                }
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintShippingOrderOCV.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintShippingOrderOCV.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                TradePartnerInfo ownerInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(ds.Tables[0].Rows[0]["OWNER_ID"].ToString(), "TRADE_PARTNER") as TradePartnerInfo;
                if (!string.IsNullOrEmpty(ownerInfo.Udf9))
                {
                    logoPath = path + @"\Upload\OwnerLogo\" + ownerInfo.Udf9;
                    if (!File.Exists(logoPath))
                    {
                        logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                    }
                }
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = string.IsNullOrEmpty(ownerInfo.Udf10) ? base.GetValueFromAppSettings("PRINT_REPORT_TITLE") : ownerInfo.Udf10;
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        private void PrintUDFReport()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["udfreportid"]))
            {
                List<WMS6.Web.BaseInfoDetailServiceRef.UdfReportSettingDetailInfo> UdfReportSettingDetailList = this.Session["UdfReportCtrl"] as List<WMS6.Web.BaseInfoDetailServiceRef.UdfReportSettingDetailInfo>;
                if (UdfReportSettingDetailList != null)
                {
                    UdfReportSettingInfo udfReportSettingInfo = BaseInfoServiceClientProxy.GetInstance().GetInfoByID(base.Request.QueryString["udfreportid"], "UDF_REPORT_SETTING") as UdfReportSettingInfo;
                    Report FReport = new Report();
                    string path = HttpContext.Current.Request.PhysicalApplicationPath;
                    path = path + @"\UdfReport\" + base.UserInfo.CurrentWH + @"\" + udfReportSettingInfo.ReportFile;
                    FReport.Report.Load(path);
                    foreach (WMS6.Web.BaseInfoDetailServiceRef.UdfReportSettingDetailInfo info in UdfReportSettingDetailList)
                    {
                        udfReportSettingInfo.DataSql = udfReportSettingInfo.DataSql.Replace(info.ParamName, info.Udf1);
                    }
                    WMS6.Web.CommonMethodServiceRef.BaseQuery baseQuery = new WMS6.Web.CommonMethodServiceRef.BaseQuery {
                        IsGetAll = true,
                        CurrentPage = "0",
                        PageSize = "100",
                        SortField = "",
                        SortDirection = "ASC"
                    };
                    DataSet ds = CommoneMethodServiceClientProxy.GetInstance().SqlQuery(udfReportSettingInfo.DataSql, baseQuery);
                    FReport.RegisterData(ds.Tables[0], udfReportSettingInfo.DataSourceName1);
                    this.WMS6PrintReport.Report = FReport;
                }
            }
        }

        private void PrintWaveShipmentReport()
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["waveIDs"]))
            {
                DataSet ds = PrintReportServiceClientProxy.GetInstance().GetPrintWaveShipmentReport(base.Request.QueryString["waveIDs"], base.Request.QueryString["OwnerID"]);
                ds.Tables[0].TableName = "ShippingOrderDetail";
                Report FReport = new Report();
                string path = base.Server.MapPath("").Replace(@"\Common", "");
                string reportPath = path + @"\Reports\" + base.Request.QueryString["OwnerID"] + "_PrintWaveShipment.frx";
                if (!File.Exists(reportPath))
                {
                    reportPath = path + @"\Reports\PrintWaveShipment.frx";
                }
                string logoPath = path + @"\Images\" + base.GetValueFromAppSettings("PRINT_REPORT_LOGO");
                FReport.Report.Load(reportPath);
                PictureObject picObject = (PictureObject) FReport.FindObject("picLogo");
                if (picObject != null)
                {
                    picObject.ImageLocation = logoPath;
                }
                TextObject textObject = (TextObject) FReport.FindObject("txtCompany");
                if (textObject != null)
                {
                    textObject.Text = base.GetValueFromAppSettings("PRINT_REPORT_TITLE");
                }
                FReport.RegisterData(ds);
                this.WMS6PrintReport.Report = FReport;
            }
        }

        protected void WMS6PrintReport_StartReport(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["rtype"]))
            {
                switch (base.Request.QueryString["rtype"].ToUpper())
                {
                    case "UDFREPORT":
                        this.PrintUDFReport();
                        break;

                    case "PRINTPURCHASEORDER":
                        this.PrintPurchaseOrder();
                        break;

                    case "PRINTSALESORDER":
                        this.PrintSalesOrder();
                        break;

                    case "PRINTRECEIPT":
                        this.PrintReceipt();
                        break;

                    case "PRINTALLOCATION":
                        this.PrintAllocation();
                        break;

                    case "PRINTRECEIPTLIST":
                        this.PrintReceiptList();
                        break;

                    case "PRINTRECEIPTHISTORY":
                        this.PrintReceiptHistory();
                        break;

                    case "PRINTOUTBOUND":
                        this.PrintOutbound();
                        break;

                    case "PRINTOUTBOUNDLIST":
                        this.PrintOutboundList();
                        break;

                    case "BATCHOUTBOUNDLISTREPORT":
                        this.PrinBatchOutboundList();
                        break;

                    case "PRINTPUTAWAYREPORT":
                        this.PrintPutAwayReport();
                        break;

                    case "PRINTPICKLISTREPORT":
                        this.PrintPickListReport();
                        break;

                    case "PRINTPICKREPORT":
                        this.PrintPickReport();
                        break;

                    case "PRINTPICKWORKREPORT":
                        this.PrintPickWorkReport();
                        break;

                    case "BATCHPICKADVICEREPORT":
                        this.PrintBatchPickAdviceReport();
                        break;

                    case "BATCHPRINTPICKLISTREPORT":
                        this.PrintBatchPickListReport();
                        break;

                    case "MERGEPRINTPICKLISTREPORT":
                        this.PrintMergePickListReportInfo();
                        break;

                    case "PICKDIVIDEREPORT":
                        this.PrintPickDivideReport();
                        break;

                    case "BATCHSHIPPINGORDERREPORT":
                        this.PrintBatchShippingOrderReport();
                        break;

                    case "PRINTWAVESHIPMENT":
                        this.PrintWaveShipmentReport();
                        break;

                    case "COMMODITYSIGNOFF":
                        this.CommoditySignoff();
                        break;

                    case "ENCASINGNOTE":
                        this.EncasingNote();
                        break;

                    case "ENCASINGDETAILNOTE":
                        this.EncasingDetailNote();
                        break;

                    case "PCMAINTENANCE":
                        if (!string.IsNullOrEmpty(base.Request.QueryString["ShowSystemQty"]))
                        {
                            if (!(base.Request.QueryString["ShowSystemQty"].ToUpper() == "TRUE"))
                            {
                                this.PrintPCMaintenanceList();
                                break;
                            }
                            this.PrintPCMaintenanceListShowSystemQty();
                        }
                        break;

                    case "PCREVIEW":
                        if (!string.IsNullOrEmpty(base.Request.QueryString["ShowSystemQty"]))
                        {
                            if (!(base.Request.QueryString["ShowSystemQty"].ToUpper() == "TRUE"))
                            {
                                this.PrintPcReview();
                                break;
                            }
                            this.PrintPcReviewShowSystemQty();
                        }
                        break;

                    case "CYCLECOUNT":
                        this.PrintCycleCountReport();
                        break;

                    case "SHIPPINGORDER":
                        this.PrintShippingOrderReport();
                        break;

                    case "SHIPPINGORDEROCV":
                        this.PrintShippingOrderReportOCV();
                        break;

                    case "PRINTORDERMOVEMENT":
                        this.PrintOrderMovement();
                        break;

                    case "PHYSICALCOUNTRPT":
                        this.PhysicalCountRpt();
                        break;

                    case "DIFFCOUNTRPT":
                        this.DiffCountRpt();
                        break;

                    case "PICKLPNLABEL":
                        this.PrintLpnLabel();
                        break;
                }
            }
        }
    }
}

